A method whereby a rotary coded plate is first attached and then a stationary coded plate is attached on the basis of the rotary coded plate, is adopted in the prior art as a method for attaching the pulse encoder to the motor. Namely, the rotary coded plate is attached to one end of an output shaft of the motor so as to be at a right angle to a central axis of the shaft and centrally aligned. On the other hand, the stationary coded plate is fixed upon a plate member having a recess for mounting a light sensor, by an adhesive agent, and the position of the light sensor is adjusted in two dimensions (in a plane) with regard to the positions of slits of the stationary coded plate, and the light sensor is fixed by screws. A spacer is interposed between the plate element and one end of the motor so that the plate element having the light sensor and the stationary coded plate are separated from said rotary coded plate by a predetermined clearance distance, and the position of the plate element is adjusted in two-dimensional directions so that slits of the rotary coded plate are coaxial with slits of the stationary coded plate, and the plate element is fixed to one end of the motor by screws.
Conventionally, a pulse encoder is built in a motor in the manner mentioned above, but it is time-consuming to attach the pulse encoder to the motor in such a manner, and an accurate attachment thereof cannot be efficiently achieved. Namely, a working step is necessary whereby the stationary coded plate is mounted separately from one end of the motor and spaced from the first mounted rotary coded plate by a predetermined clearance distance. This clearance distance must be made shorter as a resolution power of the pulse encoder increases, and thus the adjustment work becomes more difficult. Furthermore, the position of the plate element having the stationary coded plate must be adjusted in two dimensional directions so that the positions of slits of the stationary coded plate are set coaxially with the positions of slits of the rotary coded plate.